package app.r_teenus.frontend.controller;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import app.r_teenus.backend.dao.DeviceDao;
import app.r_teenus.backend.model.Device;



@Controller
public class DeviceSearchController {

    final Logger logger = LoggerFactory.getLogger(DeviceSearchController.class);
    
    static final String SEARCH_VIEW_PATH_KEY = "/deviceSearch";
    private static final String SEARCH_VIEW_KEY = "deviceSearch.html";
    @Autowired
    protected DeviceDao deviceDao = null;
    
    /**
     * <p>Deletes a employee.</p>
     * 
     * <p>Expected HTTP POST and request '/enterprise/delete'.</p>
     */
    @RequestMapping(value="/deviceSearch/delete", method=RequestMethod.POST)
    public String delete(Device device) {
    	deviceDao.delete(device);
        return SEARCH_VIEW_KEY;
    }
}
